@import '../style/var';

.van-fieldtextarea {
  &__newwrap {
    display: block;
    width: 100%;

    &--clearwrap {
      position: relative;
      // padding-right: 5px;
    }
  }
  &__wrap-con {
    display: flex;
    align-items: center;
  }
  &__control {
    overflow-y: hidden;
    box-sizing: border-box;
    width: 100%;
    min-width: 0; // for flex-shrink in field__button
    margin: 0;
    padding: 0;
    color: var(--van-fieldtextarea-text-color);
    line-height: inherit;
    text-align: inherit;
    background-color: transparent;
    border: 0;
    resize: none;

    // 原custom搬过来
    display: flex;
    align-items: center;
    min-height: var(--van-fieldtextarea-line-height);
    height: 100%;

    &::placeholder {
      color: var(--van-fieldtextarea-placeholder-color);
    }

    &:disabled {
      color: var(--van-fieldtextarea-disabled-color);
      cursor: not-allowed;
      opacity: 1;
      // fix disabled color in mobile safari
      -webkit-text-fill-color: var(--van-fieldtextarea-disabled-color);
    }

    &:read-only {
      cursor: default;
    }

    &--center {
      justify-content: center;
      text-align: center;
    }

    &--right {
      justify-content: flex-end;
      text-align: right;
    }

    &--min-height {
      min-height: @field-text-area-min-height;
    }
  }
  &__clear {
    flex-shrink: 0;
  }

  &__clear {
    // margin-right: -@padding-xs;
    // padding: 0 @padding-xs;
    line-height: inherit;
  }

  &__clear {
    color: @field-clear-icon-color;
    font-size: @field-clear-icon-size;
    cursor: pointer;
  }

  &__word-limit {
    color: @field-word-limit-color;
    font-size: @field-word-limit-font-size;
    line-height: @field-word-limit-line-height;
    text-align: right;
  }
}
